<!DOCTYPE html>
<html class="no-js" lang="">

<head>
    #include( "/public-head.html")

</head>

<body style="background-color: #ffffff !important;">

<div class="main-content" >
    <div class="panel" >
     	<div class="panel-body" >
     	 	<form action="/vrs/role/list.jsn" id="seachForm">
                <ul class="pager pager-square pull-left">
                    <li >
                        <span>角色名称：<input name="role.name" style="border: none;background: none;width: 80px;"></span>
                    </li>
                    <li>
                        <button type="submit" class="btn btn-info btn-sm btn-icon mr5 " style="line-height: 23px;">
                            <i class="fa fa-search"></i>
                            <span>搜索</span>
                        </button>
                    </li>

                </ul>
            </form>
            <ul class="pager pager-square pull-right">
                <button type="button" class="btn btn-info btn-sm btn-icon mr5" data-url="/vrs/role/edit.html" id="add-role" data-text="添加角色"  data-target="new" >
                    <i class="fa fa-plus"></i>
                    <span>添加</span>
                </button>

                <button type="button" class="btn btn-info btn-sm btn-icon mr5" data-url="/vrs/role/list.jsn">
                    <i class="fa fa-spinner"></i>
                    <span>刷新</span>
                </button>
            </ul>
            <table id="listTable" class="table table-bordered bordered table-striped table-condensed " data-url="/vrs/role/list.jsn">
                <thead>
                <tr>
                    <th>id</th>
                    <th>名称</th>
                    <th>描述</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                #if($page)
                    #foreach( $row in $!{page.rows})
                    <tr>
                        <td>$!{row.roleId}</td>
                        <td>$!{row.name}</td>
                        <td>$!{row.description}</td>
                        <td>
                            <button  class="btn btn-icon-icon btn-sm btn-primary" data-url="/vrs/role/edit.html?roleId=$!{row.roleId}"  id="update-role-$!{row.roleId}" data-text="修改角色[$!{row.roleId}]"  data-target="new"  title="编辑"><i class="fa fa-edit"></i></button>
                            <button  class="btn btn-icon-icon btn-sm btn-primary" data-url="/vrs/permission/setpermission4role.html?roleId=$!{row.roleId}" id="config-role-$!{row.roleId}" data-text="角色[$!{row.roleId}]分配权限"  data-target="new"  title="分配权限"><i class="fa fa-group"></i></button>
                            <button  class="btn btn-icon-icon btn-sm btn-danger" ajax-url="/vrs/role/delete/$!{row.roleId}.jsn" title="删除"><i class="fa fa-remove"></i></button>
                        </td>
                    </tr>
                    #end
                #end
                </tbody>
            </table>
            <ul id="ul-page" class="pager pager-square pull-left" >
                <li >
                    <a href="" id="first-page" page="1">第一页</a>
                </li>
                <li >
                    <a href="" id="prev-page" page="$!{page.prevPage}">上一页</a>
                </li>
                <li>
                    <a href="" id="next-page" page="$!{page.nextPage}">下一页</a>
                </li>
                <li >
                    <a href="" id="last-page" page="$!{page.total}">最后一页</a>
                </li>
            </ul>
            <ul class="pager pager-square pull-right">
                <li >
                    <span><input name="page" style="border: none;background: none;width: 40px;"></span>
                </li>
                <li>
                    <a href="">跳转</a>
                </li>
                <li id="page-total">
                    <span>$!{page.page}/$!{page.total} 页</span>
                </li>
                <li id="total-rows">
                    <span>总共: $!{page.records} 条</span>
                </li>
            </ul>
        </div>
    </div>

</div>

#include( "/public-script.html")
#include( "/sub-script.html")
</body>

</html>
